package com.starlink.client.jd;

import com.lop.open.api.sdk.domain.ECAP.CommonCreateOrderApi.commonCreateOrderV1.CommonCreateOrderResponse;
import com.lop.open.api.sdk.domain.ECAP.CommonModifyCancelOrderApi.commonModifyOrderV1.CommonModifyCancelOrderResponse;
import com.lop.open.api.sdk.domain.ECAP.CommonQueryOrderApi.commonGetOrderTraceV1.CommonOrderTraceResponse;
import com.lop.open.api.sdk.domain.ECAP.CommonSubscribeTraceApi.commonSubscribeTraceV1.Response;
import com.lop.open.api.sdk.domain.jdcloudprint.PullDataService.pullData.PrePrintDataInfo;
import com.starlink.client.jd.request.*;

import java.util.List;

/**
 * 京东物流client
 * https://open.jdl.com/#/open-business-document/access-guide/267/53375
 */
public interface JdClient {
    /**
     * 下单前校验
     */
    boolean preCheck(PreCheckRequest request);
    /**
     * 下单接口
     */
    CommonCreateOrderResponse create(CreateOrderRequest request);
    /**
     * 订单修改
     */
    CommonModifyCancelOrderResponse modify(ModifyOrderRequest request);
    /**
     * 订单取消
     */
    com.lop.open.api.sdk.domain.ECAP.CommonModifyCancelOrderApi.commonCancelOrderV1.CommonModifyCancelOrderResponse cancel(CancelOrderRequest request);
    /**
     * 订单轨迹查询
     */
    CommonOrderTraceResponse traceQuery(TraceQueryRequest request);
    /**
     * 订单轨迹信息订阅
     */
    Response<String> subscribeTrace(SubscribeTraceRequest request);
    /**
     * 订单状态查询
     */
    void statusGet();

    /**
     * 获取打印数据
     */
    List<PrePrintDataInfo> pullData(PullDataRequest request);
}
